package io;

import java.io.*;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name = "范传奇";
        int age = 20;
        String gender = "不明";
        String[] ontherInfo = {"眼镜小", "黑"};
        Person person = new Person(name, age, gender, ontherInfo);
        System.out.println(person);

        FileOutputStream fos = new FileOutputStream("person.obj");
        ObjectOutput oos = new ObjectOutputStream(fos);

        oos.writeObject(person);
        System.out.println("输出完毕");
        oos.close();

    }
}
